package com.ourteam.system.dao;

/**
 * Template Name : DAO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Fri Aug 18 15:51:23 CST 2017
 * Auto Generate Date : 2018-07-31 15:13:23
  * Warning ! This file will be overwrite when regenerate !
  *
 */
import org.apache.commons.lang.StringUtils;


public class SysDepartment implements java.io.Serializable {
    private long id;

    /**
     * Attribute id Be Seted Falg
     */
    private boolean idSetted = false;

    /**
    * Attribute id is Null Falg
    */
    private boolean idNull = false;
    private long parentId;

    /**
     * Attribute parentId Be Seted Falg
     */
    private boolean parentIdSetted = false;

    /**
    * Attribute parentId is Null Falg
    */
    private boolean parentIdNull = false;
    private String departmentName;

    /**
     * Attribute departmentName Be Seted Falg
     */
    private boolean departmentNameSetted = false;

    /**
    * Attribute departmentName is Null Falg
    */
    private boolean departmentNameNull = false;
    private String description;

    /**
     * Attribute description Be Seted Falg
     */
    private boolean descriptionSetted = false;

    /**
    * Attribute description is Null Falg
    */
    private boolean descriptionNull = false;
    private String status;

    /**
     * Attribute status Be Seted Falg
     */
    private boolean statusSetted = false;

    /**
    * Attribute status is Null Falg
    */
    private boolean statusNull = false;
    private java.util.Date modifyTime;

    /**
     * Attribute modifyTime Be Seted Falg
     */
    private boolean modifyTimeSetted = false;

    /**
    * Attribute modifyTime is Null Falg
    */
    private boolean modifyTimeNull = false;
    private long operatorId;

    /**
     * Attribute operatorId Be Seted Falg
     */
    private boolean operatorIdSetted = false;

    /**
    * Attribute operatorId is Null Falg
    */
    private boolean operatorIdNull = false;
    private int sortIndex;

    /**
     * Attribute sortIndex Be Seted Falg
     */
    private boolean sortIndexSetted = false;

    /**
    * Attribute sortIndex is Null Falg
    */
    private boolean sortIndexNull = false;
    private String operatorName;

    /**
     * Attribute operatorName Be Seted Falg
     */
    private boolean operatorNameSetted = false;

    /**
    * Attribute operatorName is Null Falg
    */
    private boolean operatorNameNull = false;
    private String parentDepartmentName;

    /**
     * Attribute parentDepartmentName Be Seted Falg
     */
    private boolean parentDepartmentNameSetted = false;

    /**
    * Attribute parentDepartmentName is Null Falg
    */
    private boolean parentDepartmentNameNull = false;

    public SysDepartment() {
        super();
    }

    /**
         * Get id
         *
         * @return long
         */
    final public long getId() {
        return id;
    }

    /**
     * Set id
     *
     * @param long
     */
    final public void setId(long id) {
        this.id = id;

        this.idSetted = true;

        this.setIdNull(false);
    }

    /**
     * Get id Has Been Setted
     *
     * @return boolean
     */
    final public boolean isIdSetted() {
        return this.idSetted;
    }

    /**
     * Set id Null
     *
     */
    final public void setIdNull() {
        this.idNull = true;
    }

    final public void setIdNull(boolean aNullFlag) {
        this.idNull = aNullFlag;
    }

    final public boolean isIdNull() {
        return this.idNull;
    }

    /**
         * Get parentId
         *
         * @return long
         */
    final public long getParentId() {
        return parentId;
    }

    /**
     * Set parentId
     *
     * @param long
     */
    final public void setParentId(long parentId) {
        this.parentId = parentId;

        this.parentIdSetted = true;

        this.setParentIdNull(false);
    }

    /**
     * Get parentId Has Been Setted
     *
     * @return boolean
     */
    final public boolean isParentIdSetted() {
        return this.parentIdSetted;
    }

    /**
     * Set parentId Null
     *
     */
    final public void setParentIdNull() {
        this.parentIdNull = true;
    }

    final public void setParentIdNull(boolean aNullFlag) {
        this.parentIdNull = aNullFlag;
    }

    final public boolean isParentIdNull() {
        return this.parentIdNull;
    }

    /**
         * Get departmentName
         *
         * @return String
         */
    final public String getDepartmentName() {
        if (isDepartmentNameNull()) {
            return null;
        } else {
            return StringUtils.trim(departmentName);
        }
    }

    /**
     * Set departmentName
     *
     * @param String
     */
    final public void setDepartmentName(String departmentName) {
        this.departmentName = StringUtils.trim(departmentName);

        this.departmentNameSetted = true;

        this.setDepartmentNameNull(this.departmentName == null);
    }

    /**
     * Get departmentName Has Been Setted
     *
     * @return boolean
     */
    final public boolean isDepartmentNameSetted() {
        return this.departmentNameSetted;
    }

    /**
     * Set departmentName Null
     *
     */
    final public void setDepartmentNameNull() {
        this.departmentNameNull = true;
    }

    final public void setDepartmentNameNull(boolean aNullFlag) {
        this.departmentNameNull = aNullFlag;
    }

    final public boolean isDepartmentNameNull() {
        return this.departmentNameNull;
    }

    /**
         * Get description
         *
         * @return String
         */
    final public String getDescription() {
        if (isDescriptionNull()) {
            return null;
        } else {
            return StringUtils.trim(description);
        }
    }

    /**
     * Set description
     *
     * @param String
     */
    final public void setDescription(String description) {
        this.description = StringUtils.trim(description);

        this.descriptionSetted = true;

        this.setDescriptionNull(this.description == null);
    }

    /**
     * Get description Has Been Setted
     *
     * @return boolean
     */
    final public boolean isDescriptionSetted() {
        return this.descriptionSetted;
    }

    /**
     * Set description Null
     *
     */
    final public void setDescriptionNull() {
        this.descriptionNull = true;
    }

    final public void setDescriptionNull(boolean aNullFlag) {
        this.descriptionNull = aNullFlag;
    }

    final public boolean isDescriptionNull() {
        return this.descriptionNull;
    }

    /**
         * Get status
         *
         * @return String
         */
    final public String getStatus() {
        if (isStatusNull()) {
            return null;
        } else {
            return StringUtils.trim(status);
        }
    }

    /**
     * Set status
     *
     * @param String
     */
    final public void setStatus(String status) {
        this.status = StringUtils.trim(status);

        this.statusSetted = true;

        this.setStatusNull(this.status == null);
    }

    /**
     * Get status Has Been Setted
     *
     * @return boolean
     */
    final public boolean isStatusSetted() {
        return this.statusSetted;
    }

    /**
     * Set status Null
     *
     */
    final public void setStatusNull() {
        this.statusNull = true;
    }

    final public void setStatusNull(boolean aNullFlag) {
        this.statusNull = aNullFlag;
    }

    final public boolean isStatusNull() {
        return this.statusNull;
    }

    /**
         * Get modifyTime
         *
         * @return java.util.Date
         */
    final public java.util.Date getModifyTime() {
        return modifyTime;
    }

    /**
     * Set modifyTime
     *
     * @param java.util.Date
     */
    final public void setModifyTime(java.util.Date modifyTime) {
        this.modifyTime = modifyTime;

        this.modifyTimeSetted = true;

        this.setModifyTimeNull(this.modifyTime == null);
    }

    /**
     * Get modifyTime Has Been Setted
     *
     * @return boolean
     */
    final public boolean isModifyTimeSetted() {
        return this.modifyTimeSetted;
    }

    /**
     * Set modifyTime Null
     *
     */
    final public void setModifyTimeNull() {
        this.modifyTimeNull = true;
    }

    final public void setModifyTimeNull(boolean aNullFlag) {
        this.modifyTimeNull = aNullFlag;
    }

    final public boolean isModifyTimeNull() {
        return this.modifyTimeNull;
    }

    /**
         * Get operatorId
         *
         * @return long
         */
    final public long getOperatorId() {
        return operatorId;
    }

    /**
     * Set operatorId
     *
     * @param long
     */
    final public void setOperatorId(long operatorId) {
        this.operatorId = operatorId;

        this.operatorIdSetted = true;

        this.setOperatorIdNull(false);
    }

    /**
     * Get operatorId Has Been Setted
     *
     * @return boolean
     */
    final public boolean isOperatorIdSetted() {
        return this.operatorIdSetted;
    }

    /**
     * Set operatorId Null
     *
     */
    final public void setOperatorIdNull() {
        this.operatorIdNull = true;
    }

    final public void setOperatorIdNull(boolean aNullFlag) {
        this.operatorIdNull = aNullFlag;
    }

    final public boolean isOperatorIdNull() {
        return this.operatorIdNull;
    }

    /**
         * Get sortIndex
         *
         * @return int
         */
    final public int getSortIndex() {
        return sortIndex;
    }

    /**
     * Set sortIndex
     *
     * @param int
     */
    final public void setSortIndex(int sortIndex) {
        this.sortIndex = sortIndex;

        this.sortIndexSetted = true;

        this.setSortIndexNull(false);
    }

    /**
     * Get sortIndex Has Been Setted
     *
     * @return boolean
     */
    final public boolean isSortIndexSetted() {
        return this.sortIndexSetted;
    }

    /**
     * Set sortIndex Null
     *
     */
    final public void setSortIndexNull() {
        this.sortIndexNull = true;
    }

    final public void setSortIndexNull(boolean aNullFlag) {
        this.sortIndexNull = aNullFlag;
    }

    final public boolean isSortIndexNull() {
        return this.sortIndexNull;
    }

    /**
         * Get operatorName
         *
         * @return String
         */
    final public String getOperatorName() {
        if (isOperatorNameNull()) {
            return null;
        } else {
            return StringUtils.trim(operatorName);
        }
    }

    /**
     * Set operatorName
     *
     * @param String
     */
    final public void setOperatorName(String operatorName) {
        this.operatorName = StringUtils.trim(operatorName);

        this.operatorNameSetted = true;

        this.setOperatorNameNull(this.operatorName == null);
    }

    /**
     * Get operatorName Has Been Setted
     *
     * @return boolean
     */
    final public boolean isOperatorNameSetted() {
        return this.operatorNameSetted;
    }

    /**
     * Set operatorName Null
     *
     */
    final public void setOperatorNameNull() {
        this.operatorNameNull = true;
    }

    final public void setOperatorNameNull(boolean aNullFlag) {
        this.operatorNameNull = aNullFlag;
    }

    final public boolean isOperatorNameNull() {
        return this.operatorNameNull;
    }

    /**
         * Get parentDepartmentName
         *
         * @return String
         */
    final public String getParentDepartmentName() {
        if (isParentDepartmentNameNull()) {
            return null;
        } else {
            return StringUtils.trim(parentDepartmentName);
        }
    }

    /**
     * Set parentDepartmentName
     *
     * @param String
     */
    final public void setParentDepartmentName(String parentDepartmentName) {
        this.parentDepartmentName = StringUtils.trim(parentDepartmentName);

        this.parentDepartmentNameSetted = true;

        this.setParentDepartmentNameNull(this.parentDepartmentName == null);
    }

    /**
     * Get parentDepartmentName Has Been Setted
     *
     * @return boolean
     */
    final public boolean isParentDepartmentNameSetted() {
        return this.parentDepartmentNameSetted;
    }

    /**
     * Set parentDepartmentName Null
     *
     */
    final public void setParentDepartmentNameNull() {
        this.parentDepartmentNameNull = true;
    }

    final public void setParentDepartmentNameNull(boolean aNullFlag) {
        this.parentDepartmentNameNull = aNullFlag;
    }

    final public boolean isParentDepartmentNameNull() {
        return this.parentDepartmentNameNull;
    }

    public int hashCode() {
        final int prime = 31;
        int result = 1;

        result = (prime * result) + (int) (getId() ^ (getId() >>> 32));

        return result;
    }

    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }

        if ((obj instanceof SysDepartment) == false) {
            return false;
        }

        SysDepartment other = (SysDepartment) obj;

        if (getId() != other.getId()) {
            return false;
        }

        return true;
    }

    public String toString() {
        StringBuffer buffer = new StringBuffer();

        buffer.append("[");

        buffer.append("sortIndex=");
        buffer.append(this.sortIndex);

        buffer.append("id=");
        buffer.append(this.id);

        buffer.append("parentId=");
        buffer.append(this.parentId);

        buffer.append("departmentName=");
        buffer.append(this.departmentName);

        buffer.append("description=");
        buffer.append(this.description);

        buffer.append("status=");
        buffer.append(this.status);

        buffer.append("parentDepartmentName=");
        buffer.append(this.parentDepartmentName);

        buffer.append("modifyTime=");
        buffer.append(this.modifyTime);

        buffer.append("operatorId=");
        buffer.append(this.operatorId);

        buffer.append("operatorName=");
        buffer.append(this.operatorName);

        buffer.append("]");

        return buffer.toString();
    }
}
